﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Customer : CustomerInterface
{
    private String nume;
    private Computer comp;


    public void setComputer(int i)
    {
        switch (i)
        {
            case 0:
                comp = new ServerComputer();
                break;

            case 1:
                comp = new HomeComputer();
                break;

            default:
                comp = new GamingComputer();
                break;
        }
    }

    public int getComputer()
    {
        if (comp is ServerComputer)
            return 0;
        else
            if (comp is HomeComputer)
                return 1;
            else
                return 2;
    }


    public String getNume()
    {
        return this.nume;
    }

    public void setNume(String n)
    {
        nume = n;
    }


    public String getProcNume()
    {
        return comp.getCPUPart();
    }

    public void setProcNume(String n)
    {
        comp.setCPUPart(n);
    }


    public String getMonitorNume()
    {
        return comp.getMonitorPart();
    }

    public void setMonitorNume(String n)
    {
        comp.setMonitorPart(n);
    }

    public String getRAMNume()
    {
        return comp.getRAMPart();
    }

    public void setRAMNume(String n)
    {
        comp.setRAMPart(n);
    }


    public override CustomerInterface clone()
    {
        return this.MemberwiseClone() as CustomerInterface;
    }

    public void printDetails()
    {
        Console.WriteLine(nume);
        comp.printComputerDetails();
    }
}